/*     */ package com.zimbra.qa.unittest;
/*     */ 
/*     */ import com.zimbra.common.account.Key.AccountBy;
/*     */ import com.zimbra.common.auth.ZAuthToken;
/*     */ import com.zimbra.common.service.ServiceException;
/*     */ import com.zimbra.common.soap.AccountConstants;
/*     */ import com.zimbra.common.soap.Element;
/*     */ import com.zimbra.common.soap.Element.XMLElement;
/*     */ import com.zimbra.common.soap.MailConstants;
/*     */ import com.zimbra.cs.account.Account;
/*     */ import com.zimbra.cs.account.DataSource;
/*     */ import com.zimbra.cs.account.Domain;
/*     */ import com.zimbra.cs.account.Signature;
/*     */ import com.zimbra.cs.account.soap.SoapProvisioning;
/*     */ import com.zimbra.soap.admin.type.DataSourceType;
/*     */ import java.io.PrintStream;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ import junit.framework.Assert;
/*     */ import junit.framework.TestCase;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class TestAccess
/*     */   extends TestCase
/*     */ {
/*     */   private String TEST_ID;
/*  45 */   private static String TEST_CLASS_NAME = "test-access";
/*     */   
/*     */   private SoapAdminUser mProvAdmin;
/*     */   
/*     */   private SoapUser mSoapUser1;
/*  50 */   private static int sDummyRandom = 0;
/*     */   
/*  52 */   private static String PASSWORD = "test123";
/*     */   private String DOMAIN_NAME;
/*     */   private String ACCT_1_EMAIL;
/*     */   private String ACCT_2_EMAIL;
/*     */   private String ACCT_1_ID;
/*     */   private String ACCT_2_ID;
/*     */   
/*     */   public void setUp() throws Exception
/*     */   {
/*  61 */     this.TEST_ID = TestProvisioningUtil.genTestId();
/*     */     
/*  63 */     System.out.println("\nTest " + this.TEST_ID + " setting up...\n");
/*     */     
/*     */ 
/*  66 */     this.mProvAdmin = new SoapAdminUser("admin");
/*  67 */     this.mProvAdmin.auth();
/*     */     
/*  69 */     this.DOMAIN_NAME = TestProvisioningUtil.baseDomainName(TEST_CLASS_NAME, this.TEST_ID);
/*  70 */     this.ACCT_1_EMAIL = ("acct-1@" + this.DOMAIN_NAME);
/*  71 */     this.ACCT_2_EMAIL = ("acct-2@" + this.DOMAIN_NAME);
/*     */     
/*  73 */     Domain domain = createDomain(this.DOMAIN_NAME);
/*  74 */     Account acct1 = createAccount(this.ACCT_1_EMAIL);
/*  75 */     Account acct2 = createAccount(this.ACCT_2_EMAIL);
/*     */     
/*  77 */     this.ACCT_1_ID = acct1.getId();
/*  78 */     this.ACCT_2_ID = acct2.getId();
/*     */     
/*  80 */     this.mSoapUser1 = new SoapUser(this.ACCT_1_EMAIL, this.ACCT_1_ID);
/*  81 */     this.mSoapUser1.auth();
/*     */   }
/*     */   
/*     */   private Domain createDomain(String domainName) throws Exception {
/*  85 */     Map<String, Object> attrs = new HashMap();
/*  86 */     Domain domain = this.mProvAdmin.createDomain(domainName, attrs);
/*  87 */     assertNotNull(domain);
/*  88 */     return domain;
/*     */   }
/*     */   
/*     */   private Account createAccount(String accountEmail) throws Exception {
/*  92 */     Map<String, Object> acctAttrs = new HashMap();
/*  93 */     Account acct = this.mProvAdmin.createAccount(accountEmail, PASSWORD, acctAttrs);
/*  94 */     assertNotNull(acct);
/*  95 */     return acct;
/*     */   }
/*     */   
/*     */   private static class SoapUser extends SoapProvisioning
/*     */   {
/*     */     String mName;
/*     */     String mId;
/*     */     
/*     */     SoapUser(String name, String id) {
/* 104 */       this.mName = name;
/* 105 */       this.mId = id;
/*     */       
/* 107 */       setURL();
/*     */     }
/*     */     
/*     */     void setURL() {
/* 111 */       soapSetURI(TestUtil.getSoapUrl());
/*     */     }
/*     */     
/*     */     void auth() throws ServiceException {
/* 115 */       Element.XMLElement req = new Element.XMLElement(AccountConstants.AUTH_REQUEST);
/* 116 */       Element a = req.addElement("account");
/* 117 */       a.addAttribute("by", "name");
/* 118 */       a.setText(this.mName);
/* 119 */       req.addElement("password").setText(TestAccess.PASSWORD);
/* 120 */       Element response = invoke(req);
/* 121 */       String authToken = response.getElement("authToken").getText();
/* 122 */       setAuthToken(new ZAuthToken(authToken));
/*     */     }
/*     */     
/*     */     protected Element invokeOnTargetAccount(Element request, String targetId) throws ServiceException {
/* 126 */       return super.invokeOnTargetAccount(request, targetId);
/*     */     }
/*     */   }
/*     */   
/*     */   private static class SoapAdminUser extends TestAccess.SoapUser
/*     */   {
/*     */     SoapAdminUser(String name)
/*     */     {
/* 134 */       super(null);
/*     */     }
/*     */     
/*     */     void setURL() {
/* 138 */       soapSetURI(TestUtil.getAdminSoapUrl());
/*     */     }
/*     */     
/*     */     void auth() throws ServiceException {
/* 142 */       soapAdminAuthenticate(this.mName, TestAccess.PASSWORD);
/*     */     }
/*     */     
/*     */     DataSource setup_createDataSource(TestAccess ta, TestAccess.Role role, TestAccess.Perm perm, String acctName, String dataSourceName) throws Exception
/*     */     {
/* 147 */       DataSource dataSource = null;
/*     */       try {
/* 149 */         Map<String, Object> attrs = new HashMap();
/* 150 */         attrs.put("zimbraDataSourceEnabled", "TRUE");
/* 151 */         attrs.put("zimbraDataSourceConnectionType", "ssl");
/* 152 */         attrs.put("zimbraDataSourceFolderId", ta.createFolderAndReturnFolderId(role, perm));
/* 153 */         attrs.put("zimbraDataSourceHost", "pop3.google.com");
/* 154 */         attrs.put("zimbraDataSourcePassword", "my-pop3-password");
/* 155 */         attrs.put("zimbraDataSourcePort", "8888");
/* 156 */         attrs.put("zimbraDataSourceUsername", "my-pop3-name");
/* 157 */         attrs.put("zimbraDataSourceLeaveOnServer", "TRUE");
/* 158 */         dataSource = createDataSource(get(Key.AccountBy.name, acctName), DataSourceType.pop3, dataSourceName, attrs);
/*     */       }
/*     */       catch (ServiceException e) {
/* 161 */         e.printStackTrace();
/* 162 */         Assert.fail();
/*     */       }
/* 164 */       return dataSource;
/*     */     }
/*     */   }
/*     */   
/*     */   private static String random() {
/* 169 */     String r = "" + sDummyRandom++;
/*     */     
/* 171 */     return r;
/*     */   }
/*     */   
/*     */   Element accessTest(Role role, Perm perm, Element.XMLElement req) throws Exception {
/* 175 */     System.out.println(role.name() + ": " + req.getName());
/*     */     
/* 177 */     String expectedCode = perm.getByRole(role);
/* 178 */     String resultCode = null;
/*     */     
/* 180 */     Element response = null;
/*     */     try
/*     */     {
/* 183 */       switch (role) {
/*     */       case R_USER: 
/* 185 */         response = this.mSoapUser1.invoke(req);
/* 186 */         break;
/*     */       case R_USER_TARGET_SELF: 
/* 188 */         response = this.mSoapUser1.invokeOnTargetAccount(req, this.ACCT_1_ID);
/* 189 */         break;
/*     */       case R_USER_TARGET_OTEHRUSER: 
/* 191 */         response = this.mSoapUser1.invokeOnTargetAccount(req, this.ACCT_2_ID);
/* 192 */         break;
/*     */       default: 
/* 194 */         fail();
/*     */       }
/* 196 */       resultCode = "OK";
/*     */     } catch (ServiceException e) {
/* 198 */       resultCode = e.getCode();
/*     */       
/* 200 */       if (!expectedCode.equals(resultCode)) {
/* 201 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 204 */     assertEquals(expectedCode, resultCode);
/* 205 */     return response;
/*     */   }
/*     */   
/*     */   public void Auth(Role role, Perm perm) throws Exception
/*     */   {
/* 210 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.AUTH_REQUEST);
/* 211 */     Element a = req.addElement("account");
/* 212 */     a.addAttribute("by", "name");
/* 213 */     a.setText(this.ACCT_2_EMAIL);
/* 214 */     req.addElement("password").setText(PASSWORD);
/* 215 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void AutoCompleteGal(Role role, Perm perm) throws Exception {
/* 219 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.AUTO_COMPLETE_GAL_REQUEST);
/* 220 */     req.addElement("name").setText("phoebe");
/* 221 */     req.addAttribute("type", "all");
/* 222 */     req.addAttribute("limit", "10");
/* 223 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void ChangePassword(Role role, Perm perm) throws Exception {
/* 227 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.CHANGE_PASSWORD_REQUEST);
/* 228 */     Element a = req.addElement("account");
/* 229 */     a.addAttribute("by", "name");
/* 230 */     a.setText(this.ACCT_1_EMAIL);
/* 231 */     req.addElement("oldPassword").setText(PASSWORD);
/* 232 */     req.addElement("password").setText(PASSWORD);
/* 233 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   private String createFolderAndReturnFolderId(Role role, Perm perm) throws Exception {
/* 237 */     String folderName = "/folder-" + random();
/* 238 */     Element.XMLElement req = new Element.XMLElement(MailConstants.CREATE_FOLDER_REQUEST);
/* 239 */     Element folder = req.addElement("folder");
/* 240 */     folder.addAttribute("name", folderName);
/* 241 */     Element response = accessTest(role, perm, req);
/*     */     
/* 243 */     if (response == null)
/*     */     {
/*     */ 
/*     */ 
/* 247 */       return "1000";
/*     */     }
/* 249 */     return response.getElement("folder").getAttribute("id");
/*     */   }
/*     */   
/*     */   public void CreateDataSource(Role role, Perm perm) throws Exception {
/* 253 */     String dateSourceName = "datasource-create-" + random();
/*     */     
/* 255 */     Element.XMLElement req = new Element.XMLElement(MailConstants.CREATE_DATA_SOURCE_REQUEST);
/* 256 */     Element dataSource = req.addElement("pop3");
/* 257 */     dataSource.addAttribute("name", dateSourceName);
/* 258 */     dataSource.addAttribute("isEnabled", "true");
/* 259 */     dataSource.addAttribute("host", "pop3.google.com");
/* 260 */     dataSource.addAttribute("port", "8888");
/* 261 */     dataSource.addAttribute("username", "my-pop3-name");
/* 262 */     dataSource.addAttribute("password", "my-pop3-password");
/* 263 */     dataSource.addAttribute("l", createFolderAndReturnFolderId(role, perm));
/* 264 */     dataSource.addAttribute("connectionType", "ssl");
/* 265 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void CreateIdentity(Role role, Perm perm) throws Exception {
/* 269 */     String identityName = "identity-create-" + random();
/*     */     
/* 271 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.CREATE_IDENTITY_REQUEST);
/* 272 */     Element identity = req.addElement("identity");
/* 273 */     identity.addAttribute("name", identityName);
/* 274 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void CreateSignature(Role role, Perm perm) throws Exception {
/* 278 */     String signatureName = "signature-create-" + random();
/*     */     
/* 280 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.CREATE_SIGNATURE_REQUEST);
/* 281 */     Element signature = req.addElement("signature");
/* 282 */     signature.addAttribute("name", signatureName);
/* 283 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void DeleteDataSource(Role role, Perm perm) throws Exception {
/* 287 */     String dateSourceName = "datasource-delete-" + random();
/* 288 */     DataSource ds = this.mProvAdmin.setup_createDataSource(this, role, perm, this.ACCT_1_EMAIL, dateSourceName);
/*     */     
/* 290 */     Element.XMLElement req = new Element.XMLElement(MailConstants.DELETE_DATA_SOURCE_REQUEST);
/* 291 */     Element dataSource = req.addElement("pop3");
/* 292 */     dataSource.addAttribute("id", ds.getId());
/* 293 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void DeleteIdentity(Role role, Perm perm) throws Exception {
/* 297 */     String identityName = "identity-delete-" + random();
/* 298 */     this.mProvAdmin.createIdentity(this.mProvAdmin.get(Key.AccountBy.id, this.ACCT_1_ID), identityName, new HashMap());
/*     */     
/* 300 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.DELETE_IDENTITY_REQUEST);
/* 301 */     Element identity = req.addElement("identity");
/* 302 */     identity.addAttribute("name", identityName);
/* 303 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void DeleteSignature(Role role, Perm perm) throws Exception {
/* 307 */     String signatureName = "signature-delete-" + random();
/* 308 */     Signature signature = this.mProvAdmin.createSignature(this.mProvAdmin.get(Key.AccountBy.id, this.ACCT_1_ID), signatureName, new HashMap());
/*     */     
/* 310 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.DELETE_SIGNATURE_REQUEST);
/* 311 */     Element identity = req.addElement("signature");
/* 312 */     identity.addAttribute("id", signature.getId());
/* 313 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void GetAccountInfo(Role role, Perm perm) throws Exception {
/* 317 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.GET_ACCOUNT_INFO_REQUEST);
/* 318 */     Element a = req.addElement("account");
/* 319 */     a.addAttribute("by", "name");
/*     */     
/* 321 */     if ((role == Role.R_USER) || (role == Role.R_USER_TARGET_SELF)) {
/* 322 */       a.setText(this.ACCT_1_EMAIL);
/*     */     } else {
/* 324 */       a.setText(this.ACCT_2_EMAIL);
/*     */     }
/* 326 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void GetAllLocales(Role role, Perm perm) throws Exception {
/* 330 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.GET_ALL_LOCALES_REQUEST);
/* 331 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void GetAvailableLocales(Role role, Perm perm) throws Exception {
/* 335 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.GET_AVAILABLE_LOCALES_REQUEST);
/* 336 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void GetAvailableSkins(Role role, Perm perm) throws Exception {
/* 340 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.GET_AVAILABLE_SKINS_REQUEST);
/* 341 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void GetDataSourcess(Role role, Perm perm) throws Exception {
/* 345 */     Element.XMLElement req = new Element.XMLElement(MailConstants.GET_DATA_SOURCES_REQUEST);
/* 346 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void GetIdentities(Role role, Perm perm) throws Exception {
/* 350 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.GET_IDENTITIES_REQUEST);
/* 351 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void GetInfo(Role role, Perm perm) throws Exception {
/* 355 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.GET_INFO_REQUEST);
/* 356 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void GetPrefs(Role role, Perm perm) throws Exception {
/* 360 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.GET_PREFS_REQUEST);
/* 361 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void GetSignatures(Role role, Perm perm) throws Exception {
/* 365 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.GET_SIGNATURES_REQUEST);
/* 366 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void ModifyDataSource(Role role, Perm perm) throws Exception {
/* 370 */     String dateSourceName = "datasource-modify-" + random();
/* 371 */     DataSource ds = this.mProvAdmin.setup_createDataSource(this, role, perm, this.ACCT_1_EMAIL, dateSourceName);
/*     */     
/* 373 */     Element.XMLElement req = new Element.XMLElement(MailConstants.MODIFY_DATA_SOURCE_REQUEST);
/* 374 */     Element dataSource = req.addElement("pop3");
/* 375 */     dataSource.addAttribute("id", ds.getId());
/* 376 */     dataSource.addAttribute("isEnabled", "false");
/* 377 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void ModifyIdentity(Role role, Perm perm) throws Exception {
/* 381 */     String identityName = "identity-modify-" + random();
/* 382 */     this.mProvAdmin.createIdentity(this.mProvAdmin.get(Key.AccountBy.id, this.ACCT_1_ID), identityName, new HashMap());
/*     */     
/* 384 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.MODIFY_IDENTITY_REQUEST);
/* 385 */     Element identity = req.addElement("identity");
/* 386 */     identity.addAttribute("name", identityName);
/* 387 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void ModifyPrefs(Role role, Perm perm) throws Exception {
/* 391 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.MODIFY_PREFS_REQUEST);
/* 392 */     Element p = req.addElement("pref");
/* 393 */     p.addAttribute("name", "zimbraPrefSkin");
/* 394 */     p.setText("beach");
/* 395 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void ModifyProperties(Role role, Perm perm) throws Exception {
/* 399 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.MODIFY_PROPERTIES_REQUEST);
/* 400 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void ModifySignature(Role role, Perm perm) throws Exception {
/* 404 */     String signatureName = "signature-modify-" + random();
/* 405 */     Signature signature = this.mProvAdmin.createSignature(this.mProvAdmin.get(Key.AccountBy.id, this.ACCT_1_ID), signatureName, new HashMap());
/*     */     
/* 407 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.MODIFY_SIGNATURE_REQUEST);
/* 408 */     Element identity = req.addElement("signature");
/* 409 */     identity.addAttribute("id", signature.getId());
/* 410 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void SearchCalendarResources(Role role, Perm perm) throws Exception {
/* 414 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.SEARCH_CALENDAR_RESOURCES_REQUEST);
/* 415 */     Element sf = req.addElement("searchFilter");
/* 416 */     Element cond = sf.addElement("cond");
/* 417 */     cond.addAttribute("attr", "zimbraCalResType");
/* 418 */     cond.addAttribute("op", "eq");
/* 419 */     cond.addAttribute("value", "Equipment");
/* 420 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void SearchGal(Role role, Perm perm) throws Exception {
/* 424 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.SEARCH_GAL_REQUEST);
/* 425 */     req.addElement("name").setText("phoebe");
/* 426 */     req.addAttribute("type", "all");
/* 427 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void SyncGal(Role role, Perm perm) throws Exception {
/* 431 */     Element.XMLElement req = new Element.XMLElement(AccountConstants.SYNC_GAL_REQUEST);
/* 432 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   public void TestDataSource(Role role, Perm perm) throws Exception {
/* 436 */     String dateSourceName = "datasource-test-" + random();
/* 437 */     DataSource ds = this.mProvAdmin.setup_createDataSource(this, role, perm, this.ACCT_1_EMAIL, dateSourceName);
/*     */     
/* 439 */     Element.XMLElement req = new Element.XMLElement(MailConstants.TEST_DATA_SOURCE_REQUEST);
/* 440 */     Element dataSource = req.addElement("pop3");
/* 441 */     dataSource.addAttribute("id", ds.getId());
/* 442 */     accessTest(role, perm, req);
/*     */   }
/*     */   
/*     */   private static class Perm
/*     */   {
/*     */     static final String OK = "OK";
/* 448 */     static final Perm Perm_1 = new Perm("OK", "OK", "service.PERM_DENIED");
/* 449 */     static final Perm Perm_2 = new Perm("OK", "OK", "OK");
/*     */     
/* 451 */     String[] mPerms = new String[TestAccess.Role.values().length];
/*     */     
/*     */     Perm(String user, String userTargetSelf, String userTargetOtherUser) {
/* 454 */       this.mPerms[TestAccess.Role.R_USER.ordinal()] = user;
/* 455 */       this.mPerms[TestAccess.Role.R_USER_TARGET_SELF.ordinal()] = userTargetSelf;
/* 456 */       this.mPerms[TestAccess.Role.R_USER_TARGET_OTEHRUSER.ordinal()] = userTargetOtherUser;
/*     */     }
/*     */     
/*     */     String getByRole(TestAccess.Role role) {
/* 460 */       return this.mPerms[role.ordinal()];
/*     */     }
/*     */   }
/*     */   
/*     */   private static enum Role {
/* 465 */     R_USER, 
/* 466 */     R_USER_TARGET_SELF, 
/* 467 */     R_USER_TARGET_OTEHRUSER;
/*     */     
/*     */ 
/*     */ 
/*     */ 
/*     */     private Role() {}
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   public void testAccess()
/*     */     throws Exception
/*     */   {
/* 481 */     for (Role role : ) {
/* 482 */       Auth(role, Perm.Perm_2);
/* 483 */       AutoCompleteGal(role, Perm.Perm_1);
/*     */       
/* 485 */       ChangePassword(role, Perm.Perm_2);
/* 486 */       this.mSoapUser1.auth();
/*     */       
/* 488 */       CreateDataSource(role, Perm.Perm_1);
/* 489 */       CreateIdentity(role, Perm.Perm_1);
/* 490 */       CreateSignature(role, Perm.Perm_1);
/* 491 */       DeleteDataSource(role, Perm.Perm_1);
/* 492 */       DeleteIdentity(role, Perm.Perm_1);
/* 493 */       DeleteSignature(role, Perm.Perm_1);
/* 494 */       GetAccountInfo(role, Perm.Perm_2);
/* 495 */       GetAllLocales(role, Perm.Perm_2);
/* 496 */       GetAvailableLocales(role, Perm.Perm_1);
/* 497 */       GetAvailableSkins(role, Perm.Perm_1);
/* 498 */       GetDataSourcess(role, Perm.Perm_1);
/* 499 */       GetIdentities(role, Perm.Perm_1);
/* 500 */       GetInfo(role, Perm.Perm_1);
/* 501 */       GetPrefs(role, Perm.Perm_1);
/* 502 */       GetSignatures(role, Perm.Perm_1);
/* 503 */       ModifyDataSource(role, Perm.Perm_1);
/* 504 */       ModifyIdentity(role, Perm.Perm_1);
/* 505 */       ModifyPrefs(role, Perm.Perm_1);
/* 506 */       ModifyProperties(role, Perm.Perm_1);
/* 507 */       ModifySignature(role, Perm.Perm_1);
/* 508 */       SearchCalendarResources(role, Perm.Perm_1);
/* 509 */       SearchGal(role, Perm.Perm_1);
/* 510 */       SyncGal(role, Perm.Perm_1);
/* 511 */       TestDataSource(role, Perm.Perm_1);
/*     */     }
/* 513 */     System.out.println("\nTest " + this.TEST_ID + " done, all is well\n");
/*     */   }
/*     */   
/*     */   public static void main(String[] args) throws Exception {
/* 517 */     TestUtil.cliSetup();
/* 518 */     TestUtil.runTest(TestAccess.class);
/*     */   }
/*     */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/qa/unittest/TestAccess.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */